<?php
date_default_timezone_set('America/Sao_Paulo');

require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();

define('SF_ROOT_DIR',     realpath(dirname(__FILE__).'/..'));
define('NUM_LIST_ITENS',  10);
define('MAX_PAGER_LINKS', 5);

class ProjectConfiguration extends sfProjectConfiguration
{
	public function setup()
	{
        sfConfig::set('sf_thumbnail_dir', sfConfig::get('sf_upload_dir').'/thumb');

		$this->enablePlugins(
            array(
            	'sfDoctrinePlugin',
            	'CreatixLibPlugin',
            	'sfDoctrineGuardPlugin',
                'sfDoctrineApplyPlugin',
                'sfFormExtraPlugin',
                'sfThumbnailPlugin',
                'sfBrFormExtraPlugin',
            	'sfJqueryReloadedPlugin'
        	)
        );

		// for compatibility / remove and enable only the plugins you want
		$this->enableAllPluginsExcept(array('sfPropelPlugin'));
	}
	
	public function configureDoctrine(Doctrine_Manager $manager)
	{
		// Enable callbacks so that softDelete behavior can be used
		$manager->setAttribute(Doctrine::ATTR_USE_DQL_CALLBACKS, true);
	}
}

